Skip to content

[Fix] Custom automation results stay stale when user runs them now - #2446

Merged
roomote-roomote[bot] merged 2 commits into
developfrom
fix/custom-automation-run-refresh-2meo5maa9q5qb
Sep 10, 2026
Merged

[Fix] Custom automation results stay stale when user runs them now#2446
roomote-roomote[bot] merged 2 commits into
developfrom
fix/custom-automation-run-refresh-2meo5maa9q5qb

Conversation

@roomote-roomote

@roomote-roomote roomote-roomote Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

​Opened on behalf of @daniel-lxs. Follow up by mentioning @roomote-roomote, in the web UI, or in Slack.

What changed

  • Running a custom automation now refreshes its card immediately so persisted Last run and latest-result fields do not remain stale.
  • Queued or launched Fast runs receive seven sparse, bounded follow-up refreshes through the existing ten-minute launch-claim recovery window, while completed and failed outcomes refresh only once.
  • A mounted-state guard prevents late mutation callbacks from creating follow-up timers after the Run now button unmounts.
  • Focused regression coverage exercises completed, failed, launched, queued, and unmount-before-resolution behavior.

Why this change was made

The Run now action only showed a toast, unlike adjacent custom-automation mutations that refresh the list. Immediate outcomes therefore stayed stale until reload, and queued Fast runs needed bounded follow-up because their durable result is recorded asynchronously after the mutation returns.

Impact

Custom automation cards now show persisted run metadata without requiring a reload. The change does not add indefinite polling, clears pending refresh timers when the button unmounts, and avoids creating new timers if the mutation resolves after navigation.

PR #2444 changes cadence rendering in the same component and later cadence-specific tests. This PR does not modify cadenceLabel or its call site; a synthetic merge-tree check against #2444 completed without conflicts after the lifecycle fix. Focused and full client coverage, web static checks, knip, and pre-push checks passed. The lifecycle fix has no visible mounted UI state to capture, so browser proof is not applicable to the updated head.

@roomote-community

roomote-community Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

No new code issues found. See task

  • Do not schedule follow-up refreshes after CustomAutomationRunButton unmounts (apps/web/src/components/settings/automations/CustomAutomationsSection.tsx:177).

Reviewed 60894a0

@roomote-roomote
roomote-roomote Bot marked this pull request as ready for review September 10, 2026 14:03
@roomote-roomote
roomote-roomote Bot merged commit e2654d5 into develop Sep 10, 2026
17 checks passed
@roomote-roomote
roomote-roomote Bot deleted the fix/custom-automation-run-refresh-2meo5maa9q5qb branch September 10, 2026 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant